# Contributor: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
maintainer="team/kde <bribbers@disroot.org>"
pkgname=filelight
pkgver=24.08.2
pkgrel=1
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://kde.org/applications/utilities/filelight"
pkgdesc="An application to visualize the disk usage on your computer"
license="(GPL-2.0-only OR GPL-3.0-only) AND GFDL-1.2-only"
makedepends="
	extra-cmake-modules
	kdeclarative-dev
	kdoctools-dev
	ki18n-dev
	kio-dev
	kirigami-addons-dev
	kxmlgui-dev
	qqc2-desktop-style-dev
	qt6-qtbase-dev
	samurai
	"
checkdepends="xvfb-run"
_repo_url="https://invent.kde.org/utilities/filelight.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/filelight-$pkgver.tar.xz"
subpackages="$pkgname-dbg $pkgname-doc $pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	xvfb-run -a ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
4f7dd0da113ec8fb967dda4b7a2e5be7654701e94393d8572e2caddcdb272e3fbd6d2657a271c8c5bd03cd697a6c9ff63148e5ca3a13554df020a6dc291cc23c  filelight-24.08.2.tar.xz
"
